package org.xiji.visitor;

import java.util.List;

/**
 * 电脑类
 */
public class Computer {

    /**
     * 扩展usb集合
     */
    private List<Usb> usbs;

    //插入usb
    public void insert(Usb usb){

    }
    //拔出usb
    public void remove(Usb usb){

    }

    public void extendUsbInfo(List<Usb> usbs ) {
        //遍历扩展功能
        for (Usb usb : usbs) {
            usb.mouseUsb(this);
            usb.keyboardUsb(this);
        }
    }

    //向上移动鼠标
    public void moveMouse(){
        System.out.println("向上鼠标移动");
    }
    //向下移动鼠标
    public void downMouse(){
        System.out.println("向下鼠标移动");
    }

    //向左移动鼠标
    public void leftMouse(){
        System.out.println("向左鼠标移动");
    }

    //向右移动鼠标
    public void rightMouse(){
        System.out.println("向右鼠标移动");
    }

    public void leftKeyboard(){
        System.out.println("按下键盘的左键");
    }
    public void rightKeyboard(){
        System.out.println("按下键盘的右键");
    }
    public void upKeyboard(){
        System.out.println("按下键盘的上键");
    }
    public void downKeyboard(){
        System.out.println("按下键盘的下贱");
    }
}
